
import './App.scss'
import { BrowserRouter, Switch, Route, Redirect } from 'react-router-dom'
import Layout from '@/pages/layout'
import Login from '@/pages/login'
import NotFound from '@/pages/404'

function App () {
  return (
    <BrowserRouter>
      <div className="app">
        <Switch>
          {/* 路由重定向 */}
          <Redirect exact from='/' to='/home' />
          <Route path="/login" component={Login} />
          <Route path="/home" component={Layout} />
          <Route component={NotFound} />
        </Switch>

      </div>
    </BrowserRouter>
  )
}

export default App
